package com.example.photography.Activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.photography.R;
import com.example.photography.common.BaseActivity;
import com.example.photography.util.Util;

import butterknife.BindView;
import butterknife.ButterKnife;

public class About_us extends BaseActivity {


    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rl_title)
    RelativeLayout rlTitle;
    @BindView(R.id.iv_icon)
    ImageView ivIcon;
    @BindView(R.id.tv_appname)
    TextView tvAppname;
    @BindView(R.id.tv_version)
    TextView tvVersion;
    @BindView(R.id.page1)
    LinearLayout page1;
    @BindView(R.id.rl_refrech)
    RelativeLayout rlRefrech;
    @BindView(R.id.rl_privacy)
    RelativeLayout rlPrivacy;
    @BindView(R.id.rl_protocol)
    RelativeLayout rlProtocol;
    @BindView(R.id.page2)
    LinearLayout page2;

    @Override
    protected void initData() {
        initListen();

    }

    private void initListen() {
        //返回
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                removeCurrentActivity();
            }
        });
        //检测更新
        rlRefrech.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goToActivity(UpdateActivity.class, new Bundle());

            }
        });
        //隐私政策
        rlPrivacy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Util.showToast(About_us.this, "隐私政策");
            }
        });
        //用户协议
        rlProtocol.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Util.showToast(About_us.this, "用户协议");
            }
        });

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_about_us;
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
